#ifndef _MD5SUM_H_
#define _MD5SUM_H_

#include <string>

// #ifdef WIN32
// #ifdef MD5_EXPORTS
// #define MD5_API __declspec(dllexport)
// #else
// #define MD5_API __declspec(dllimport)
// #endif // End of #ifdef MD5_EXPORTS
// #else  // End of WIN32
// #define MD5_API
// #endif // End of LINUX

#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )

typedef struct
{
    unsigned int A, B, C, D;	  /* chaining variables */
    unsigned int  nblocks;
    unsigned char buf[64];
    int  count;
} MD5_CONTEXT;

#define FF(b, c, d) (d ^ (b & (c ^ d)))
#define FG(b, c, d) FF (d, b, c)
#define FH(b, c, d) (b ^ c ^ d)
#define FI(b, c, d) (c ^ (b | ~d))

#define X(a) do { *(unsigned int*)p = hd-> a ; p += 4; } while(0)

extern "C"
{
    //MD5_API 
    bool GetMd5Sum(const std::string& strFilePath, std::string& strMd5Sum);
}

#endif
